import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
   redirect:'/home'
  },
  {
    path: '/page',
    name: 'page',
    component: () => import('../views/page.vue'),
    children: [
      {
        path: '/home',
        name: 'home',
        component:()=>import('../views/home.vue')
      },
      {
        path: '/list',
        name: 'list',
        component: () => import('../views/list.vue')
      },
      {
        path: '/shopcar',
        name: 'shopcar',
        component: () => import('../views/shopcar.vue')
      },
      {
        path: '/me',
        name: 'me',
        component: () => import('../views/me.vue')
      }
    ]
  },
  {
    path: '/xq',
    name: 'xq',
    component:()=>import('../views/xq.vue')
  }
  
  
];

const router = new VueRouter({
  routes,
});

export default router;
